import React from 'react'
import { Result as AntdResult } from 'antd'
import { DnFC } from '@designable/react'
import { FormattedMessage } from '@designable/event-system'

export const Result: DnFC<React.ComponentProps<typeof AntdResult>> = (
  props
) => {
  const { title, subTitle, children, ...rest } = props as any
  return (
    <AntdResult
      {...(rest as any)}
      title={<FormattedMessage id={title} />}
      subTitle={<FormattedMessage id={subTitle} />}
      extra={children}
    ></AntdResult>
  )
}
